package datatypes;

import java.util.List;
import java.util.Set;

/**
 * Represent a MultipleChoiceQuestion
 * @author Rupert
 *
 */
public class MultipleChoiceQuestion {
	private String question;
	private List<String> answerPossibilities;
	private Set<Integer> correctAnswers;
	
	public MultipleChoiceQuestion(String question, List<String> answers, Set<Integer> correctAnswers){
		this.setQuestion(question);
		this.setAnswers(answers);
		this.setCorrectAnswers(correctAnswers);
	}
	
	/**
	 * adding the given answer to the correctAnswers data set
	 * @param answer
	 */
	public void addCorrectAnswer(int answer){
		correctAnswers.add(answer);
	}
	
	/**
	 * remove the given answer to the data set
	 * @param answer
	 */
	public void removeCorrectAnswer(int answer){
		correctAnswers.remove(answer);
	}

	/**
	 * add a new answer possibility to the list of answer possibilities
	 * @param answerPossibility
	 */
	public void addAnswerPossibility(String answerPossibility){
		answerPossibilities.add(answerPossibility);
	}
	
	/**
	 * remove a answer possibility from the list containing answer possibilities
	 * @param answerPossibility
	 */
	public void removeAnswerPossibility(String answerPossibility){
		answerPossibilities.remove(answerPossibility);
	}
	
	/*
	 * GETTERS & SETTERS
	 */
	public String getQuestion() {
		return question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	public List<String> getAnswers() {
		return answerPossibilities;
	}

	public void setAnswers(List<String> answers) {
		this.answerPossibilities = answers;
	}

	public Set<Integer> getCorrectAnswers() {
		return correctAnswers;
	}

	public void setCorrectAnswers(Set<Integer> correctAnswers) {
		this.correctAnswers = correctAnswers;
	}
	
	
}
